package com.cccyy.data.compare;

import cn.hutool.core.convert.Convert;

public class CompareJava {
    public static void main(String[] args) {
//        testCompare("80", "70");
//        testCompare("70", "70");
//        testCompare("60", "70");
        testCompareDouble();
    }

    /**
     * @param verificationScore 校验结果
     * @param verifyScore       设定分数
     */
    private static void testCompare(String verificationScore, String verifyScore) {
        int i = verificationScore.compareTo(verifyScore);
        System.out.println(i);
        System.out.println("---------------------------------");
    }

    private static void testCompareDouble() {
        //分数对比
        String verificationScoreResp = "60.713";
        Double verificationScore = Convert.toDouble(verificationScoreResp);
        System.out.println(verificationScore);

        String verifyScore = "70";
        Double verifyScoreConfig = Convert.toDouble(verifyScore);
        if (verificationScore >= verifyScoreConfig) {
            System.out.println("达到标准：" + verificationScore);
        } else {
            System.out.println("未达到标准：" + verificationScore);
        }
    }
}
